package com.petlab.dao.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.petlab.dao.AchievementGroupDao;
import com.petlab.dao.Dao;
import com.petlab.model.AchievementGroup;

@Component("achievenmentGroupDao")
public class AchievementGroupDaoImpl implements AchievementGroupDao {

	private Dao dao;

	public Dao getDao() {
		return dao;
	}

	@Resource
	public void setDao(Dao dao) {
		this.dao = dao;
	}

	public void createNewAchievementGroup(AchievementGroup achievementGroup) {
		dao.add(achievementGroup);

	}

	public void deleteAchievementGroup(AchievementGroup achievementGroup) {
		dao.delete(achievementGroup);

	}

	public List<AchievementGroup> getAllAchievementGroup() {
		return dao.findAll(AchievementGroup.class);
	}

}
